const express = require('express')
const router = express.Router()

const departmentMsgHandle = require('../router_handle/department_msg')

// 获取部门信息
router.post('/getDepartmentMsg', departmentMsgHandle.getDepartmentMsg)
// 获取部门消息列表
router.post('/getDepartmentMsgList', departmentMsgHandle.getDepartmentMsgList)
// 获取该用户的未读消息
router.post('/getReadList', departmentMsgHandle.getReadList)
// 已读某条消息
router.post('/readMessage', departmentMsgHandle.readMessage)
// 把新发布的消息 id 插入到当前所属部门的 read_list 中
router.post('/addDepartmentMsg', departmentMsgHandle.addDepartmentMsg)
// 把新发布的消息 id 从当前所属部门的 read_list 删除
router.post('/deleteDepartmentMsg', departmentMsgHandle.deleteDepartmentMsg)
// 获取该用户未读消息(内容)
router.post('/getUserMsg', departmentMsgHandle.getUserMsg)

module.exports = router